import { useTable } from '@/components/table';
import {
  IBusinessClassification,
  apiGetBusinessClassificationDelete,
  apiGetBusinessClassificationPage,
} from '@/services/type';
import { useRequest } from 'ahooks';
import { message } from 'antd';
import React from 'react';

const Index: React.FC<any> = (props) => {
    console.log(props,'props')
  const { tableProps, refresh, search, form } = useTable(
    (params: IBusinessClassification) => {
      return apiGetBusinessClassificationPage(params);
    },
    {},
  );

  const { run: del } = useRequest(
    (id: number) =>
      apiGetBusinessClassificationDelete(id).then((res) => {
        if (res.code === 0) {
          refresh();
          message.success('删除成功');
        } else {
          message.error(res.message);
        }
      }),
    {
      manual: true,
    },
  );

  return (
    <div>
      <image
        src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
      />
    </div>
  );
};

export default Index;
